Is there a way to copy an object between modules while maintaining the Object Identifier and absolute number through DXL?
I know if this is possible it will return an error in case the absolute number already exists in the second module, but assume this will not occur camba - Thu Sep 29 08:42:50 EDT 2016 |
Re: Copy object between modules In rare circumstances a copy could give you same numbers but that wouldn't happen on a regular basis. |
Re: Copy object between modules Yes there are ways to do this. I implemented once in the Branch Manager product of IT-QBase a script that will replicate a Baseline including object identifiers. The strategy here is first to create a lot of objects fast (as many as you need until you reach the wanted / maximum absolute number). I found the fastest way to do this, was creating 5-10 empty objects, copying them, taking the resulting 10-20 objects, copy them, etc. until you reach the correct absolute number. Then you copy the attributes from the original objects over to the copied objects. Then you restructure your copied objects to match the structure of the original objects. So far so good. BUT: It seems you are relying on the absolute number as an identifer. You should not do this. While the absolute number is unique inside the module, it does not serve well as an identifier. You should think about using a custom attribute for your identifiers, relieving you from the problem of not being able to set the absolute number. Or you create a special module in which the absolute number is editable. :-) (-> joke, although it is possible!) Regards, Mathias |
Re: Copy object between modules Mathias Mamsch - Fri Sep 30 07:38:55 EDT 2016 Yes there are ways to do this. I implemented once in the Branch Manager product of IT-QBase a script that will replicate a Baseline including object identifiers. The strategy here is first to create a lot of objects fast (as many as you need until you reach the wanted / maximum absolute number). I found the fastest way to do this, was creating 5-10 empty objects, copying them, taking the resulting 10-20 objects, copy them, etc. until you reach the correct absolute number. Then you copy the attributes from the original objects over to the copied objects. Then you restructure your copied objects to match the structure of the original objects. So far so good. BUT: It seems you are relying on the absolute number as an identifer. You should not do this. While the absolute number is unique inside the module, it does not serve well as an identifier. You should think about using a custom attribute for your identifiers, relieving you from the problem of not being able to set the absolute number. Or you create a special module in which the absolute number is editable. :-) (-> joke, although it is possible!) Regards, Mathias Seems like you ignored the fact the user ask about a single object and not an entire module.
What if the object is already -- used. Are you going to tell him to reassign an already used object id |
Re: Copy object between modules DOORSHAM - Sat Oct 01 07:16:41 EDT 2016 Seems like you ignored the fact the user ask about a single object and not an entire module.
What if the object is already -- used. Are you going to tell him to reassign an already used object id I assumed (maybe incorrectly) that the user is talking about a setup, where one module gets new objects first, and under some condition these objects are copied over to the other module. In this case the strategy for copying one object is the same as for an entire module: create objects until you get the right absolute number, delete the ones you do not need, and put it at the right place and give it the right attribute values. If you think a bit about it, the question does not make sense if you assume there is the possibility that the absolute number is already taken. The whole approach works ONLY for modules, where you can ensure that the module to which you will copy has lower absolute numbers than the one you are copying from (a "Master / Slave" situation where the slave only gets objects from the master). And again for you (in case you missed it): If people find they need to copy absolute numbers, in my opinion they are paying way to much attention to the absolute numbers. They should think about introducing a custom attribute for requirement identifiers. The way that works is usually the combination of a DXL attribute (requirement identifier) in combination with a manual identifier field. If the manual identifier is set, then the DXL attribute will use that one, if not the DXL attribute will show the object identifier. This way you can get around most problems, when it comes to needing to copy requirements from one module to another keeping the identifier the same. Regards, Mathias |
Re: Copy object between modules Sorry, I am just a beginner in DXL. I am probably going to create another attribute and use it to compare ;)
Thank you for your help! |